package com.freesky.biz.abchina.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.freesky.common.annotation.Desensitized;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
@ContentRowHeight(22)
@ColumnWidth(25)
@HeadRowHeight(25)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)
public class TLoanRecord implements java.io.Serializable {
    private static final long serialVersionUID = 1L;

    @ExcelProperty("客户号")
    private String custId;

    @ExcelProperty("手机号码")
    @Desensitized(type = Desensitized.DesensitizedType.PHONE)
    private String mobile;

    @ExcelProperty("总福分")
    private String totalScore;

    @ExcelProperty("领取有福分")
    private String score;

    @ExcelProperty("发放状态")
    private String processed;

    @ExcelIgnore
    private String processedMsg;

    @ExcelProperty("发放时间")
    private String processedDate;

    @ExcelProperty("领取时间")
    private String createDate;

    @ExcelIgnore
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }
    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
